using System.Collections.Generic;
using System.Xml.Linq;
using modelbuilder.parts;
using NUnit.Framework;
using System.Linq;

namespace modelbuilder.tests.parts
{
    [TestFixture]
    public class XmlFileAdapterTests
    {
        private XmlFileAdapter sut;
        private IEnumerable<XDocument> result;

        [SetUp]
        public void Setup() {
            sut = new XmlFileAdapter();
            sut.Out_Result += x => result = x;
        }

        [Test]
        public void Xml_Datei_wird_eingelesen() {
            sut.In_Process(new[]{@"Testdaten\a.ebc.xml"});
            Assert.That(result.First().Element("board"), Is.Not.Null);
        }
    }
}